<template>
  <div>
    PiniaPage.vue 
    <hr>
    {{ Person }} {{ Test.company }}{{ Test.Person }}
    <button @click="change">action</button>
  </div>
</template>

<script setup lang="ts">
import TestStore from '@/pinia/TestStore';
import { ref } from 'vue';
import { storeToRefs } from 'pinia';
const Test=TestStore()
let a=ref(Test.company)
let {Person,company}=storeToRefs(Test)


function change(){
  // Test.change()
  // console.log(Test.company);
  Test.company="Lw1"
  Test.$patch({Person:{Name:'xm',Age:19}})

}
</script>
<style lang="scss" scoped>
</style>
